<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Prime Faces</title>
        <style type="text/css">
            .ui-fileupload {
                width: 800px;
                margin: 0 auto;
            }
        </style>
    </h:head>
    <h:body>
        <h:outputText value="PrimeFaces Multiple Upload"
                              style="font:30px bold; margin-left:15%;"/>
        <h:form enctype="multipart/form-data">
            <p:fileUpload fileUploadListener="#{fileUploadControl.handleFileUpload}"
                mode="advanced"
                update="messages"
                label="Choose a file"
                sizeLimit="10485760"
                multiple="true"
                allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
                invalidSizeMessage="The maximum file size allowed is 10 Megabytes !"
                invalidFileMessage="You are allowed to upload only images !"
                />
            <p:growl id="messages" showDetail="true" life="5000"/>
        </h:form>

    </h:body>
</html>

